package cn.hzy.admin.controller.demo;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 处理请求 Controller
 */
@RestController // 这个注解表示不做页面跳转 直接返回字符串 适合做 WebApi @Controller + @ResponsBody
@RequestMapping("/hello")
public class HelloController {

    @GetMapping("/index")
    public String helloWorld() {
        return "你好呀！我是 Java";
    }

}
